# Author fengzhilaoling
# coding=utf-8
# @Time    : 2020/10/2 上午11:53
# @Site    : 
# @File    : ext.py
# @Software: PyCharm
# @contact: fengzhilaoling@163.com

# 第三方插件的初始化
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate

db = SQLAlchemy()  # 生产数据库对象
migrate = Migrate()


def init_ext(app):
    db.init_app(app)  # 初始化数据库
    migrate.init_app(app, db)  # 使用migrate进行数据库迁移
